package com.yanqu.road.entity.activity.suitang.data;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.activity.suitang.enums.eSuiTangWarType;

@FieldTypeAnnotation(tableName = "t_c_suitang_city_event_data")
public class CrossSuiTangCityEvent extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "商会分组ID", select = true, update = true)
    private int groupId;

    @FieldTypeAnnotation(desc = "活动分组，每轮都会进行重新分组", update = true)
    private int actGroupId;

    @FieldTypeAnnotation(desc = "当前轮次", update = true)
    private int round;

    @FieldTypeAnnotation(desc = "当前所在战场", update = true)
    private eSuiTangWarType warType;

    @FieldTypeAnnotation(desc = "城市ID", update = true)
    private int cityId;

    @FieldTypeAnnotation(desc = "buff ID")
    private int buffId;

    @FieldTypeAnnotation(desc = "刷新时间")
    private long refreshTime;

    @FieldTypeAnnotation(desc = "结束时间")
    private long endTime;

    @FieldTypeAnnotation(desc = "商会")
    private String UnionId = "";

    public CrossSuiTangCityEvent() {
    }

    public CrossSuiTangCityEvent(int activityId, int groupId, int actGroupId, int round, eSuiTangWarType warType, int cityId, int buffId, long refreshTime) {
        this.activityId = activityId;
        this.groupId = groupId;
        this.actGroupId = actGroupId;
        this.round = round;
        this.warType = warType;
        this.cityId = cityId;
        this.buffId = buffId;
        this.refreshTime = refreshTime;
        this.setInsertOption();
    }

    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }
    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getActGroupId() {
        return actGroupId;
    }
    public void setActGroupId(int actGroupId) {
        if (this.actGroupId != actGroupId) {
            this.actGroupId = actGroupId;
            setOp(DataStatus.Update);
        }
    }

    public int getRound() {
        return round;
    }
    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public eSuiTangWarType getWarType() {
        return warType;
    }
    public void setWarType(eSuiTangWarType warType) {
        if (null == warType){
            return;
        }
        if (this.warType == null || !this.warType.equals(warType)) {
            this.warType = warType;
            setOp(DataStatus.Update);
        }
    }

    public int getCityId() {
        return cityId;
    }
    public void setCityId(int cityId) {
        if (this.cityId != cityId) {
            this.cityId = cityId;
            setOp(DataStatus.Update);
        }
    }

    public int getBuffId() {
        return buffId;
    }
    public void setBuffId(int buffId) {
        if (this.buffId != buffId) {
            this.buffId = buffId;
            setOp(DataStatus.Update);
        }
    }

    public long getRefreshTime() {
        return refreshTime;
    }
    public void setRefreshTime(long refreshTime) {
        if (this.refreshTime != refreshTime) {
            this.refreshTime = refreshTime;
            setOp(DataStatus.Update);
        }
    }

    public long getEndTime() {
        return endTime;
    }
    public void setEndTime(long endTime) {
        if (this.endTime != endTime) {
            this.endTime = endTime;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return UnionId;
    }
    public void setUnionId(String UnionId) {
        if (UnionId == null){
            return;
        }
        if (this.UnionId == null || !this.UnionId.equals(UnionId)) {
            this.UnionId = UnionId;
            setOp(DataStatus.Update);
        }
    }
}
